package com.gjj.echarts.echartsgjj.vo;

import lombok.ToString;

import java.math.BigDecimal;

@ToString
/**
 * 每月的数据包含三种大类：网上渠道、柜面渠道和自动扣款
 */
public class OneMonthVo {
    //月份
    private Integer month;
    private OnlineChannelVo onlineChannelVo;
    private CabinetSideChannelVo cabinetSideChannelVo;
    private AutoChannelVo autoChannelVo;

    //总额
    private BigDecimal onlineSum;
    private BigDecimal cabinetSideSum;
    private BigDecimal autoSum;

    //汇缴金额总额
    private BigDecimal totalMoney;

    public Integer getMonth() {
        return month;
    }

    public void setMonth(Integer month) {
        this.month = month;
    }

    public OnlineChannelVo getOnlineChannelVo() {
        return onlineChannelVo;
    }

    public void setOnlineChannelVo(OnlineChannelVo onlineChannelVo) {
        this.onlineChannelVo = onlineChannelVo;
    }

    public CabinetSideChannelVo getCabinetSideChannelVo() {
        return cabinetSideChannelVo;
    }

    public void setCabinetSideChannelVo(CabinetSideChannelVo cabinetSideChannelVo) {
        this.cabinetSideChannelVo = cabinetSideChannelVo;
    }

    public AutoChannelVo getAutoChannelVo() {
        return autoChannelVo;
    }

    public void setAutoChannelVo(AutoChannelVo autoChannelVo) {
        this.autoChannelVo = autoChannelVo;
    }

    public BigDecimal getOnlineSum() {
        BigDecimal bigDecimal = new BigDecimal("0");
        bigDecimal = bigDecimal.add(this.getOnlineChannelVo().getRetentionPayment()).add(this.getOnlineChannelVo().getOnlineBanking());
        return bigDecimal;
    }

    public BigDecimal getCabinetSideSum() {
        BigDecimal bigDecimal = new BigDecimal("0");
        bigDecimal = bigDecimal.add(this.getCabinetSideChannelVo().getBankAccounting()).add(this.getCabinetSideChannelVo().getCheck()).add(this.getCabinetSideChannelVo().getCreditVoucher());
        return bigDecimal;
    }

    public BigDecimal getAutoSum() {
        BigDecimal bigDecimal = new BigDecimal("0");
        bigDecimal = bigDecimal.add(this.getAutoChannelVo().getConsignmentCollection());
        return bigDecimal;
    }

    public BigDecimal getTotalMoney() {
        return getOnlineSum().add(getAutoSum()).add(getCabinetSideSum());
    }
}
